package com.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 自定义异常类
 */
@Data
//考虑父类属性true，只考虑自身为false
@EqualsAndHashCode(callSuper = true)
public class MyException extends RuntimeException{

    private Integer code;

    private String msg;

    public MyException(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

}
